The Tab View Component > FTabView.addItemAt()

 

FTabView.addItemAt()

Availability

Flash Player 6.

Usage

myTab_tbv.addItemAt (index, label [,data])

Parameters

index A number indicating the index where the new tab should be created.

label A string specifying the label of the new tab.

data An optional Object, which is specified will be associated with the tab.

Returns

Nothing

Description

Adds a tab at the specified index. The component will automatically redraw to show the newly added tab. If a string is passed in for the second parameter a user defined object will automatically be created with the string as the label.

Note

none

Example

The tab_example1.fla example file contains an example of using this method.

The following code adds a tab named Tab1 to the beginning of the component, and then traces its label.

myTab_tbv.addItemAt( 0, "Tab1" );
 trace( "Tab 1: " + myTab_tbv.getItemAt( 0 ).label ); //traces "Tab 1: Tab1"

See also

FTabView.addItem()

FTabView.getItemAt()

FTabView.removeItemAt()

FTabView.replaceItemAt()